#pragma once

#include "../dock_widgets/SPx/spx_filter_proxy_model.h"
#include "../dock_widgets/SPx/spx_info_view.h"
#include "../dock_widgets/SPx/spx_info_model.h"
#include <QtWidgets/QDockWidget>

#include "GeneratedFiles/ui_spx_dock_widget.h"

class spx_info_dock : public QDockWidget
{
    Q_OBJECT
public:
    spx_info_dock(QWidget * parent);

    QItemSelectionModel* get_select_model();
    spx_info_view * get_table_view();
public slots:
    void apply_filter();
    void reset_filter();

    void reset();

    void update_data();
    void currentRowChanged(const QModelIndex&current, const QModelIndex & previous);
    void hight_light_item(info_keys key);
signals:
    void select_id(info_keys key);

private:
    spx_filter_proxy_model *filter_model;
    spx_info_model *spx_model;
    QItemSelectionModel *select_model;
    unsigned int current_select_id;

    Ui::SPxDockWidget ui;
};

